<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>函数</title>
    </head>
    <body>

        <script>
            var util = {};
            util.sendAjax = function(obj) {
                var url = obj.url;
                var data = obj.data;
                var async = obj.async;
                var loadFlag = obj.loadFlag == undefined ? false : obj.loadFlag;
                var type = obj.type;
                var cache = obj.cache;
                var successfn = obj.success;
                var unSuccess = obj.unSuccess;
                var completefn = obj.complete;
                var notice = obj.notice;
                console.log("url: " + url);
                console.log("data: " + data);
            }
       
         
            util.sendAjax({
                url: '#(ctxPath)/bank/agentUser/modifyStatus',
                data: 'wdnmd'
            })
            
            let obj=new Object();
            obj.url='#(ctxPath)/bank/agentUser/modifyStatus';
            obj.data= 'wdnmd';
            util.sendAjax(obj);
            
            let req={
                
                url: '#(ctxPath)/bank/agentUser/modifyStatus',
                data: 'wdnmd', 
                successfn: successfn // 相当于形参, 不是直接调用;
                
            };
            
            
            let req1={
                
                url: '#(ctxPath)/bank/agentUser/modifyStatus',
                data: 'wdnmd', 
                successfn: successfn() //直接就调用, 相当于实参;
                
            };
            
             util.sendAjax(req);
            
            
            function successfn(){
                console.log("woc");
                }
            
            
            
            
            
        </script>







    </body>
</html>
